﻿<local:KinectButtonBase x:Class="Kinect.Tests.ConfirmButton"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Kinect.Tests"
             mc:Ignorable="d" 
             Margin="0,0,10,10">
    <local:KinectButtonBase.Template>
        <ControlTemplate TargetType="{x:Type local:KinectButtonBase}">
            <Grid x:Name="Root" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </Grid.RenderTransform>
             
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup>
                        <VisualState x:Name="Hover">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Normal"/>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>

                <ContentPresenter />          
                
                <Button Style="{StaticResource KinectButtonTemplateStyle}" BorderThickness="0" Background="#00000000" Margin="0,-50,-50,0" />
                <Rectangle MouseEnter="Rectangle_MouseEnter" Fill="{TemplateBinding Background}" />
                <Border MouseEnter="Background_MouseEnter" x:Name="Background" BorderThickness="0" Background="{TemplateBinding Background}" Width="50" Height="50" HorizontalAlignment="Right" Margin="0,-50,-50,0" VerticalAlignment="Top" Visibility="Collapsed">
                    <TextBlock Text=" Ok" Style="{StaticResource ToolLabelStyle}"/>
                </Border>
                <TextBlock Visibility="{Binding SmallText}" Text="{TemplateBinding Tag}" Style="{StaticResource ToolLabelStyle}" TextWrapping="WrapWithOverflow"  />
                <TextBlock Visibility="{Binding LargeText}" Text="{TemplateBinding Tag}" Style="{StaticResource ToolLabelStyleLarge}" TextWrapping="WrapWithOverflow"  />
            </Grid>

            

        </ControlTemplate>
    </local:KinectButtonBase.Template>
</local:KinectButtonBase>
